home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************************************
- *
- *
- * CursorUtilities.h - cursor stuff- spinning watch, etc
- *
- * 26/9/94 ©1994, Graham Cox
- *
- *************************************************************************************************/
-
- #pragma once
-
- #ifndef __CURSORUTILITIES__
- #define __CURSORUTILITIES__
-
- #include <Retrace.h>
-
- // animated cursor record
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- typedef struct
- {
- unsigned short numCursors;
- unsigned short index;
- CursHandle cursors[1];
- }
- acur, *acurPtr, **acurHdl;
-
- // modified task record
-
- typedef struct
- {
- VBLTask theTask;
- long A5;
- acurHdl theCursor;
- }
- VBLTaskWithA5, *VBLTaskWithA5Ptr;
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- // globals- this is OK as we only have one cursor!
-
- extern short gVBLCount;
- extern VBLTaskWithA5Ptr gCursorTask;
- extern acurHdl gWatchSpinner;
- extern acurHdl gBallSpinner;
-
- // prototypes
- #ifdef __cplusplus
- extern "C"
- {
- #endif
-
- acurHdl InitAnimatedCursor(short resID);
- void StartCursorAnimation(short period,acurHdl theCursor);
- void StopCursorAnimation(void);
- void AnimateCursor(short increment,acurHdl theCursor);
- void LockCursorData(acurHdl theCursor);
- void UnlockCursorData(acurHdl theCursor);
-
- #ifndef __powerc
- void VBLCursorSpin();
- #else
- void VBLCursorSpin(VBLTaskWithA5Ptr theTask);
- #endif
-
- void SetWatchCursor();
- void SetBeachBallCursor();
- short GetModifiers();
-
- void AppCursorInit();
- Boolean CursorAnimating();
-
- #ifdef __cplusplus
- }
- #endif
-
- // constants
-
- #define kWatchFrameCount 8
- #define kWatchResID 129
- #define kBeachBallResID 128
-
- #endif
-